package com.favccxx.search.domain.datamapper;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Tolerate;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.List;

/**
 * @author favccxx
 */
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "us_data_mapper")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class DataMapper {

    @Id
    private String id;

    private String querySql;

    private String conceptModelId;

    private String conceptModelCode;

    private String projectId;

    private String mapperType;

    @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
    private List mapperFields;

    private String mapperCondition;

}
